<!doctype html>
<html>
<head>
	<link rel="stylesheet" href="main.css" />

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
	<script src="jQuery.url.js"></script>
	<!-- json2 is included because some browsers doesnt have it (e.g. ie8)	-->
	<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
	<script src="../../easyWebSocket.min.js"></script>
	<script src="https://github.com/joewalnes/smoothie/raw/master/smoothie.js"></script>
	<script src="main.js"></script>
</head>
<body>
	<div id="container">
		<div class="header">
			<h1>EasyWebSocket Monitor</h1>
			<p>
				This page monitors <a href="http://easywebsocket.org">EasyWebSocket</a> time efficiency.
			</p>
		</div>
		<hr/>
		<div class="content">
			<p>
				<span class="url label">Url:</span>
				<span class="url data"></span>
			</p>
			<p>
				<span class="cnxTime label">Connection Time:</span>
				<span class="cnxTime data">Connecting</span>
			</p>
			<p>
				<span class="latency label">Ping Latency:</span>
				<span class="latency data">in msec</span>
			</p>
			<p>
				<canvas id="chart" width="450" height="100"></canvas>
				<br>
				chart display from <a href="http://smoothiecharts.org/">smoothiecharts</a>
			</p>
		</div>
		<hr/>
		<div class="footer">
			Set <code>url</code> to change the WebSocket url, and <code>period</code> in msec to change
			the latency refresh rate (like <a href="?period=1000&url=ws://easywebsocket.org/foobar">this</a>)
		</div>
	</div>
	<!-- google analytic support -->
	<script type="text/javascript">
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', 'UA-4037844-15']);
		_gaq.push(['_trackPageview']);
		(function() {
		  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		})();
	</script>	
</body>
</html>
